/*
 * @Date: 2021-11-23 23:12:02
 * @LastEditors: xiaolan
 * @LastEditTime: 2021-11-23 23:13:03
 * @FilePath: \pms\web\notice\send.js
 */
let sendCURD = {
  // 个性化显示页面
  user_role: sessionStorage.getItem('user_role'),
  showPage() {
    let user_manage = document.getElementById('user_manage')
    let project_manage = document.getElementById('project_manage')
    let money = document.getElementById('money')
    let contract = document.getElementById('contract')
    if (this.user_role == '组员') {
      user_manage.style.display = 'none'
      project_manage.style.display = 'none'
      money.style.display = 'none'
      contract.style.display = 'none'
    }
  },
  // 增加会议信息
  addnoticeInfo() {
    let oper = 'add'

    document
      .querySelector('#datatable_notice_add_button')
      .addEventListener('click', function () {
        $('#notice_add_form').modal('show')
      })
  },
  //导出会议信息
  exportnoticeInfo() {
    let oper = 'export'
    document
      .querySelector('#datatable_notice_export_button')
      .addEventListener('click', function () {
        $('#notice_export_form').modal('show')
      })
  },
  init() {
    this.showPage()
    this.addnoticeInfo()
    this.exportnoticeInfo()
  },
}

sendCURD.init()
